﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace _02ReverseString
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.Write("Enter some text:");
            string someText = Console.ReadLine();
            Console.WriteLine("The text you entered is:{0}", someText);
            Console.WriteLine("And the same text reversed is:{0}", ReverseString(someText));
        }
        static string ReverseString(string str)
        {
            StringBuilder result = new StringBuilder();
            for (int i = str.Length - 1; i >= 0; i--)
            {
                result.Append(str[i]);
            }
            return result.ToString();
        }
    }
}
